C Program to Compute Quotient and Remainder
Given two numbers A and B. The task is to write a program to find the quotient and remainder of these two numbers when A is divided by B....
read more
C Program For Removing Duplicates From A Sorted Linked List
Write a function that takes a list sorted in non-decreasing order and deletes any duplicate nodes from the list. The list should only be traversed once. For example if the linked list is 11->11->11->21->43->43->60 then removeDuplicates() should convert the list to 11->21->43->60....
read more
Value of Pi(Π) up to 50 decimal places
Given a number N(where N <= 50), the task is to find the value of Pi (?) up to N decimals places.Examples:...
read more
Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
Given Preorder, Inorder and Postorder traversals of some tree. The task is to check if they all are of the same tree.Examples:...
read more
C Program To Find Armstrong Numbers Between 1 to 1000
Prerequisites: Program for Armstrong Numbers...
read more
C Program to Show Runtime Exceptions
Runtime exceptions occur while the program is running. Here, the compilation process will be successful.  These errors occur due to segmentation faults and when a number is divided by a division operator or modulo division operator....
read more
C Program to Check if count of divisors is even or odd
Given a number “n”, find its total number of divisors is even or odd....
read more
C++ Program To Check If a Prime Number Can Be Expressed as Sum of Two Prime Numbers
Given a prime number . The task is to check if it is possible to express as sum of two separate prime numbers.Note: The range of N is less than 108....
read more
Construct a graph using N vertices whose shortest distance between K pair of vertices is 2
Given two positive integers N and K, the task is to construct a simple and connected graph consisting of N vertices with the length of each edge as 1 unit, such that the shortest distance between exactly K pairs of vertices is 2. If it is not possible to construct the graph, then print -1. Otherwise, print the edges of the graph....
read more
C program to find the frequency of characters in a string
Given a string S containing lowercase English characters, the task is to find the frequency of all the characters in the string....
read more
Sum of two large Floating-point numbers
Given two very large floating-point numbers in form of large strings str1 and str2, the task is to add the given two numbers. Example:...
read more
Clockwise/Spiral Rule in C/C++ with Examples
The Spiral/Clockwise Method is a magic tool for C/C++ programmers to define the meaning of syntax declaration in the head within seconds. This method was created by David Anderson and here is a short brief about how to apply this method....
read more